<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
	</head>
	<body>
		<div id="vue">
			<button @click="add">{{message}}</button>
			<ul>
				<li v-for="(value,key) in arr">{{value}}</li>
			</ul>
		</div>
	</body>
	<script type="application/javascript">
		new Vue({
			el:'#vue',
			data:{
				message:'添加',
				arr:['yaozhen','heyi','cuijie']
			},
			methods:{
				add:function(){
					this.arr.push('houzheng');
				}
			}
		})
	</script>
</html>
